<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/views/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>我的粉丝</title>
	<%@ include file="/views/include/nocachehead.jsp"%>
</head>

<body>
	<%@ include file="/views/include/statusbar.jsp"%><br/><br/><br/>
	
	<c:set var="redirectUrl" value="${pageContext.request.contextPath}/fans/${requestScope.ownerId }.html?curpage=${requestScope.page.curpage }"/>
	<div>
		<c:forEach items="${fanList}" var="fan">
			<div>
				<div>
					<a href="${pageContext.request.contextPath}/wo/${fan.fanId}.html">
						<img alt="${fan.fanNickname}" src="${pageContext.request.contextPath}/image/${fan.fanPortrait}" />
					</a>
				</div>
				<div>
					<p>
						<a href="${pageContext.request.contextPath}/wo/${fan.fanId}.html">
							<skyline:summary length="10" value="${fan.fanNickname }"/>
						</a>
					</p>
					<p>
						<c:if test="${fan.followed }">
							<a class="followed">已关注</a>
						</c:if>
						<c:if test="${not fan.followed }">
							<a href="#" onclick="Follow.follow('${fan.fanId }','${fan.fanNickname }','${fan.fanPortrait }','USER',this,followedOk,'${redirectUrl }');">关注TA</a>
						</c:if>
					</p>
				</div>
			</div>
		</c:forEach>
	</div>
	<div>
		<skyline:page url="${pageContext.request.contextPath}/fans/${requestScope.ownerId}.html"
			page="${requestScope.page}" maxSize="6" />
	</div>
	
	<script type="text/javascript">
		function followedOk(input) {
			$(input).html("已关注").addClass("followed").removeAttr("onclick").removeAttr("href");
		}
	</script>
</body>
</html>